Repository navigation
SearchControl: Deprecate onClose prop - #65988
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @Vrishabhsk! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
mirka
left a comment
There was a problem hiding this comment.
Looking good, thank you for contributing!
In case it's useful when contributing to wp-components in the future, we usually just spin up the Storybook (npm run storybook:dev) when testing things like this, without going through the hassle of making a test plugin 🙂
|
Could you also add a changelog entry please? Thanks! |
Remove WithOnClose storybook variation. Refactor deprecation message. Add @ignore for onClose in types.ts. Add deprecations section in CHANGELOG.md
✍️ Dev NoteSearchControl: Deprecated
|
* Soft deprecate onClose function prop and execute deprecated * Update README and StoryBook JSDoc * Expect console.warn due to deprecated func call and fix typo * Address PR feedback Remove WithOnClose storybook variation. Refactor deprecation message. Add @ignore for onClose in types.ts. Add deprecations section in CHANGELOG.md * Replace toHaveWarned with toHaveWarnedWith Co-authored-by: Vrishabhsk <vrishabhsk@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org>
* Soft deprecate onClose function prop and execute deprecated * Update README and StoryBook JSDoc * Expect console.warn due to deprecated func call and fix typo * Address PR feedback Remove WithOnClose storybook variation. Refactor deprecation message. Add @ignore for onClose in types.ts. Add deprecations section in CHANGELOG.md * Replace toHaveWarned with toHaveWarnedWith Co-authored-by: Vrishabhsk <vrishabhsk@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org>
What?
@deprecatedforonClosefunction prop forSearchControl componentREADME.md,JSDocandStoryBookwith_Note: this prop is deprecated._onCloseprop is provided, executedeprecatedfrom@wordpress/deprecatedtestto expectconsole.warnwhenonCloseis provided + fixshould shouldtypoWhy?
onCloseprop #65334How?
Soft DeprecatestheonClosepropdeprecationnotice in theSearchControl's docsdeprecatedwhenonCloseis providedtestto expectdeprecation warningTesting Instructions
pluginsdirectory of yourWordPressinstallationGutenbergplugin via thePlugins Admin Page.edit.jsto useSelectControlcomponentDeprecated Hook